<?php
class Core_Model_Validation {
	
	public function __construct(){
		
	}
	
	public function validation(array $vars){
		
		try {
			if($this->trimEmpty($vars)){
				return true;
			}
			else {
				throw new Exception("Data can not be empty or data can not be only whitespace!");
			}
		}
		catch(Exception $e){
			echo $e->getMessage();
		}
		
	}
	
	private function trimEmpty(array $vars){
		foreach($vars as $key => $value){
			if((trim($value) == "") || ($value == null)){
				return false;
			}
		}
		return true;
	}
	
}